#!/bin/bash
VMS_WORK_DIR="/root/xen/vms_work_dir"
VM_OPS_LOG_DIR="/var/log/vm"
VM_OPS_SCRIPTS_DIR="/root/xen/vm_ops_scripts"


BASE_IMAGE_PATH="/root/xen/baseimage"

init_env(){
if [ ! -d $VMS_WORK_DIR ];then
  mkdir -p $VMS_WORK_DIR >/dev/null 2>&1;
fi
if [ ! -d $VM_OPS_LOG_DIR ];then
  mkdir -p $VM_OPS_LOG_DIR >/dev/null 2>&1;
fi
if [ ! -d $VM_OPS_SCRIPTS_DIR ];then
  LOG_MSG "not find vm ops scripts dir"
  return 255
fi
if [ ! -d $BASE_IMAGE_PATH ];then
  LOG_MSG "not find base iamge path"
  return 255
fi

}
source $VM_OPS_SCRIPTS_DIR/utils/log.bash
source $VM_OPS_SCRIPTS_DIR/utils/misc.bash
source $VM_OPS_SCRIPTS_DIR/utils/vhd_ops.bash
source $VM_OPS_SCRIPTS_DIR/utils/vm_ops.bash
init_env
